package spass.scene;

import java.util.ArrayList;
import java.util.List;

import spass.scene.light.DirectionalLight;

public class Scene { // TODO scene = composite scene object ?

    private DirectionalLight directionalLight;
    private List<SceneObject> objects;

    public void setDirectionalLight(DirectionalLight light) {
        this.directionalLight = light;
    }

    public DirectionalLight getDirectionalLight() {
        return directionalLight.copy();
    }

    public void setObjects(List<SceneObject> sceneObjects) {
        this.objects = sceneObjects;
    }

    public List<SceneObject> getObjects() {
        return new ArrayList<SceneObject>(objects);
    }

    public SceneObject getCompositeSceneObject() {
        return new CompositeSceneObject(objects.toArray(new SceneObject[objects.size()]));
    }

    public List<SceneObject> getObjectsExcept(SceneObject object) {
        List<SceneObject> allObjects = new ArrayList<SceneObject>(objects);
        allObjects.remove(object);
        return allObjects;
    }

}
